﻿namespace OrderServiceLevel1.Model
{
    public class Order
    {
        private int id;
        private string currency;
        private string status;
        private bool placed;
        private Customer customer;
        private LineItems items = new LineItems();

        public int Id
        {
            get { return this.id; }
            set { this.id = value; }
        }

        public string Currency
        {
            get { return this.currency; }
            set { this.currency = value; }
        }

        public string Status
        {
            get { return this.status; }
            set { this.status = value; }
        }

        public bool Placed
        {
            get { return this.placed; }
            set { this.placed = value; }
        }

        public Customer Customer
        {
            get { return this.customer; }
            set { this.customer = value; }
        }

        public LineItems Items
        {
            get { return this.items; }
            set { this.items = value; }
        }

        public void AddItem(Item item)
        {
            this.items.AddItem(item);
        }

        public override string ToString()
        {
            return string.Format("Id: {0} - Currency: {1} - Status: {2} - Placed: {3}", this.id, this.currency, this.status, this.placed);
        }
    }
}